package com.supplychainapi.service;

import com.joindata.inf.common.basic.exceptions.ServiceException;
import com.supplychainapi.model.ScmTbseqno;

/**
 * Created by wangziqi on 2017/10/11.
 */
public interface TbSeqNoService {


    boolean isExit(ScmTbseqno model) throws ServiceException;

    /**
     * 新增
     * @param model
     * @return
     */
    ScmTbseqno insert(ScmTbseqno model,String shopGuid) throws ServiceException;


    /**
     * 更新
     * @param model
     * @return
     */
     boolean update(ScmTbseqno model) throws ServiceException;


    /**
     * 删除
     * @param model
     * @return
     */
     boolean delete(ScmTbseqno model) throws ServiceException;


    /**
     * 查询 根据fsShopGUID 和fsCls
     * @param model
     * @return  最新编码
     */
     String selectSeqNo(ScmTbseqno model) throws ServiceException;


    void checkCode(ScmTbseqno model) throws ServiceException;

    /**
     * 检查code是否大于数据库中值
     *
     * @param value
     * @param type
     * @param fsShopGUID
     * @throws ServiceException
     */
    void checkCode(String value, Integer type, String fsShopGUID) throws ServiceException;


    String getNo(Integer type, String fsShopGUID);


    String getOrderNo(String fsParamId, String tableName, String fsShopGUID);
}
